using System;
using System.Collections.Generic;
using System.Linq;

namespace CF_DAL_WS.Repositories
{
	#region using
	using CF_DAL_WS.Models;
	using CF_DAL_WS.Helpers;
	#endregion
	public class RoleRepository
	{
        public List<aspnet_Roles> SelectAll()
        {
            try
            {
                return DataContext.Instance.aspnet_Roles.OrderBy(p => p.RoleName).ToList();
            }
            catch (Exception ex)
            {
                if (ex.InnerException != null)
                {
                    GlobalVariables.Logger.Error(ex.InnerException.Message);
                }
                else
                {
                    GlobalVariables.Logger.Error(ex.Message);
                }
            }
            return new List<aspnet_Roles>();
        }
	}
}